package architect.design.patterns.structural.bridge;

/**
 * 文件下载器实现
 *
 * @author guanxin
 * @date 2018/5/5 14:37
 */

public class FileDownloader implements IFileDownloader {

    private FileDownloaderBridge fileDownloaderBridge;

    public FileDownloader(FileDownloaderBridge fileDownloaderBridge) {
        super();
        this.fileDownloaderBridge = fileDownloaderBridge;
    }

    public Object download(String path) {
        return fileDownloaderBridge.downloadFile(path);
    }

    public boolean store(Object object) {
        return fileDownloaderBridge.storeFile(object);
    }

    public boolean delete(String path) {
        return fileDownloaderBridge.deleteFile(path);
    }
}
